---
title: "Linux 系统添加要证书"
date: 2019-4-17
categories:
- linux
tags:
---

<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgb65429f">Ubuntu, Debian</a></li>
<li><a href="#org3a0da0c">Centos 6</a></li>
</ul>
</div>
</div>
<blockquote>
<p>
<a href="https://briansnelson.com/How_to_add_trusted_root_certificates#Centos_6">https://briansnelson.com/How_to_add_trusted_root_certificates#Centos_6</a>
</p>
</blockquote>
<div class="outline-2" id="outline-container-orgb65429f">
<h2 id="orgb65429f">Ubuntu, Debian</h2>
<div class="outline-text-2" id="text-orgb65429f">
<p>
Add
</p>
<p>
Copy your CA to dir <i>usr/local/share/ca-certificates</i>
</p>
<p>
Use command:
</p>
<p>
sudo cp new.crt /usr/local/share/ca-certificates/new.crt
</p>
<p>
Update the CA store:
</p>
<p>
sudo update-ca-certificates
</p>
<p>
Remove
</p>
<p>
Remove your CA.
</p>
<p>
Update the CA store:
</p>
<p>
sudo update-ca-certificates –fresh
</p>
</div>
</div>
<div class="outline-2" id="outline-container-org3a0da0c">
<h2 id="org3a0da0c">Centos 6</h2>
<div class="outline-text-2" id="text-org3a0da0c">
<p>
Add
</p>
<p>
Install the ca-certificates package:
</p>
<p>
yum install ca-certificates
</p>
<p>
Enable the dynamic CA configuration feature:
</p>
<p>
update-ca-trust enable
</p>
<p>
Add it as a new file to <i>etc/pki/ca-trust/source/anchors</i>:
</p>
<p>
cp new.crt <i>etc/pki/ca-trust/source/anchors</i>
</p>
<p>
Use command:
</p>
<p>
update-ca-trust extract
</p>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="date">Date: 2019-4-17</p>
<p class="author">Author: amo</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
